\(\int \cos ^2(e+f x) (a+b \sec ^2(e+f x))^p \, dx\) [308]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (warning: unable to verify)
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 83 \[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\frac {\operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \tan (e+f x) \left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p}}{f} \]

[Out]

AppellF1(1/2,2,-p,3/2,-tan(f*x+e)^2,-b*tan(f*x+e)^2/(a+b))*tan(f*x+e)*(a+b+b*tan(f*x+e)^2)^p/f/((1+b*tan(f*x+e
)^2/(a+b))^p)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4231, 441, 440} \[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\frac {\tan (e+f x) \left (a+b \tan ^2(e+f x)+b\right )^p \left (\frac {b \tan ^2(e+f x)}{a+b}+1\right )^{-p} \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )}{f} \]

[In]

Int[Cos[e + f*x]^2*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Tan[e + f*x]*(a + b + b*Tan[e + f*x
]^2)^p)/(f*(1 + (b*Tan[e + f*x]^2)/(a + b))^p)

Rule 440

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 441

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^F
racPart[p]/(1 + b*(x^n/a))^FracPart[p]), Int[(1 + b*(x^n/a))^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 4231

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fre
eFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 + ff^2*x^2)^(m/2 - 1)*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/
2), x]^p, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b+b x^2\right )^p}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\left (\left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {b x^2}{a+b}\right )^p}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \tan (e+f x) \left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p}}{f} \\ \end{align*}

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(1914\) vs. \(2(83)=166\).

Time = 16.55 (sec) , antiderivative size = 1914, normalized size of antiderivative = 23.06 \[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\frac {3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \cos (e+f x) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-2+p} \left (a+b \sec ^2(e+f x)\right )^p \sin (e+f x)}{f \left (3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)\right ) \left (\frac {3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-1+p}}{3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}-\frac {6 a (a+b) p \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^{-1+p} \sec ^2(e+f x)^{-2+p} \sin (2 (e+f x)) \tan (e+f x)}{3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}+\frac {6 (a+b) (-2+p) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-2+p} \tan ^2(e+f x)}{3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}+\frac {3 (a+b) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-2+p} \tan (e+f x) \left (\frac {2 b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{3 (a+b)}-\frac {4}{3} \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )}{3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}-\frac {3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-2+p} \tan (e+f x) \left (4 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \sec ^2(e+f x) \tan (e+f x)+3 (a+b) \left (\frac {2 b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{3 (a+b)}-\frac {4}{3} \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )+2 \tan ^2(e+f x) \left (b p \left (-\frac {6 b (1-p) \operatorname {AppellF1}\left (\frac {5}{2},2,2-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{5 (a+b)}-\frac {12}{5} \operatorname {AppellF1}\left (\frac {5}{2},3,1-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )-2 (a+b) \left (\frac {6 b p \operatorname {AppellF1}\left (\frac {5}{2},3,1-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{5 (a+b)}-\frac {18}{5} \operatorname {AppellF1}\left (\frac {5}{2},4,-p,\frac {7}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )\right )\right )}{\left (3 (a+b) \operatorname {AppellF1}\left (\frac {1}{2},2,-p,\frac {3}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p \operatorname {AppellF1}\left (\frac {3}{2},2,1-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-2 (a+b) \operatorname {AppellF1}\left (\frac {3}{2},3,-p,\frac {5}{2},-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)\right )^2}\right )} \]

[In]

Integrate[Cos[e + f*x]^2*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(3*(a + b)*AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Cos[e + f*x]*(a + 2*b + a
*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-2 + p)*(a + b*Sec[e + f*x]^2)^p*Sin[e + f*x])/(f*(3*(a + b)*AppellF1[1
/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e +
 f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 2*(a + b)*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*
x]^2)/(a + b))])*Tan[e + f*x]^2)*((3*(a + b)*AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(
a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-1 + p))/(3*(a + b)*AppellF1[1/2, 2, -p, 3/2, -Tan
[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e
+ f*x]^2)/(a + b))] - 2*(a + b)*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan
[e + f*x]^2) - (6*a*(a + b)*p*AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a + 2
*b + a*Cos[2*(e + f*x)])^(-1 + p)*(Sec[e + f*x]^2)^(-2 + p)*Sin[2*(e + f*x)]*Tan[e + f*x])/(3*(a + b)*AppellF1
[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e
 + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 2*(a + b)*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e +
f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (6*(a + b)*(-2 + p)*AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e
 + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-2 + p)*Tan[e + f*x]^2)/(3*(a + b)*App
ellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*AppellF1[3/2, 2, 1 - p, 5/2, -
Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 2*(a + b)*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan
[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (3*(a + b)*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-2 + p
)*Tan[e + f*x]*((2*b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*
x]^2*Tan[e + f*x])/(3*(a + b)) - (4*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*
Sec[e + f*x]^2*Tan[e + f*x])/3))/(3*(a + b)*AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a
 + b))] + 2*(b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 2*(a + b)*Appe
llF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) - (3*(a + b)*AppellF1[1
/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]
^2)^(-2 + p)*Tan[e + f*x]*(4*(b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]
 - 2*(a + b)*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Sec[e + f*x]^2*Tan[e +
 f*x] + 3*(a + b)*((2*b*p*AppellF1[3/2, 2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e +
 f*x]^2*Tan[e + f*x])/(3*(a + b)) - (4*AppellF1[3/2, 3, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b)
)]*Sec[e + f*x]^2*Tan[e + f*x])/3) + 2*Tan[e + f*x]^2*(b*p*((-6*b*(1 - p)*AppellF1[5/2, 2, 2 - p, 7/2, -Tan[e
+ f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a + b)) - (12*AppellF1[5/2, 3, 1 - p
, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/5) - 2*(a + b)*((6*b*p*App
ellF1[5/2, 3, 1 - p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a +
 b)) - (18*AppellF1[5/2, 4, -p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*
x])/5))))/(3*(a + b)*AppellF1[1/2, 2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 2*(b*p*Appell
F1[3/2, 2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] - 2*(a + b)*AppellF1[3/2, 3, -p, 5/2, -
Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2)^2))

Maple [F]

\[\int \cos \left (f x +e \right )^{2} \left (a +b \sec \left (f x +e \right )^{2}\right )^{p}d x\]

[In]

int(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^p,x)

[Out]

int(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^p,x)

Fricas [F]

\[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{2} \,d x } \]

[In]

integrate(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^p,x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^2, x)

Sympy [F(-1)]

Timed out. \[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\text {Timed out} \]

[In]

integrate(cos(f*x+e)**2*(a+b*sec(f*x+e)**2)**p,x)

[Out]

Timed out

Maxima [F]

\[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{2} \,d x } \]

[In]

integrate(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^p,x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^2, x)

Giac [F]

\[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{2} \,d x } \]

[In]

integrate(cos(f*x+e)^2*(a+b*sec(f*x+e)^2)^p,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^2, x)

Mupad [F(-1)]

Timed out. \[ \int \cos ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int {\cos \left (e+f\,x\right )}^2\,{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^p \,d x \]

[In]

int(cos(e + f*x)^2*(a + b/cos(e + f*x)^2)^p,x)

[Out]

int(cos(e + f*x)^2*(a + b/cos(e + f*x)^2)^p, x)